<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Create User</title>
<link type="text/css" href="../css/style.css" rel="stylesheet"></link>
</head>
<script type="text/javascript">
	function check_fields() {
		var field1 = document.getElementById('pwd');
		var field2 = document.getElementById('repwd');
		var field3 = document.getElementById('username');
		if (field3.value == "") {
			alert('Username field can not be empty!');
			return false;
		}
		if (field1.value == "" || field2.value == "") {
			alert('Password fields can not be empty!');
			return false;
		}
		if (field1.value !== field2.value) {
			alert('Two passwords you entered does not match. Please try again!');
			return false;
		} else {
			return true;
		}
	}
</script>
<%@include file="../checkSession.jsp"%>
<body>
	<div id="wrap">
		<%@include file="adminHeader.jsp"%>
		<font size="3" face="verdana" color="orange">Create New User</font>
		<div class="center_content">
			<div class="right_content">
				<form name="input" action="../../ServletCreateUser" method="post">
					<table>
						<tr>
							<td align="right">Username:</td>
							<td><input type="text" name="user" id="username" /></td>
						<tr>
							<td align="right">Password:</td>
							<td><input type="password" name="pwd" id="pwd" /></td>
						</tr>
						<tr>
							<td align="right">Retypepass:</td>
							<td><input type="password" name="repwd" id="repwd" /></td>
						</tr>
						<tr>
							<td align="right">Quota:</td>
							<td><select name="Quota">
									<option value="10M">10M</option>
									<option value="100M">100M</option>
									<option value="500M">500M</option>
									<option value="Unlimited">Unlimited</option>
							</select></td>
						</tr>
						<tr>
							<td align="right">Role:</td>
							<td><input type="radio" name="role" value="user"
								checked='checked'>user</td>
						</tr>
					</table>
					<input type="submit" onclick="return check_fields(); return true;"
						value="Submit" /><br>

				</form>
			</div>
		</div>
	</div>
</body>
</html>